package com.tom.jmgd.core.entity;


import com.tom.jmgd.core.enums.ResultEnum;

public class ResultEntity {
    /**
     * 返回结果状态码 200=正确  500=错误。。。。
     */
    private int code;

    /**
     * 返回消息
     */
    private String msg;

    /**
     * 返回结果集
     */
    private Object data;

    public ResultEntity(int code, String msg, Object content) {
        this.code = code;
        this.msg = msg;
        this.data = content;
    }

    public ResultEntity(ResultEnum resultEnum, Object content) {
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
        this.data = content;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
